Automated Validation of Class Invariants in C ++ Applications
نویسندگان
چکیده
In this paper, we describe a non-invasive approach for validation of class invariants in C++ applications. Our approach is fully automated so that the user need only supply the class invariants for each class hierarchy to be checked and our validator constructs an InvariantVisitor, a variation of the Visitor Pattern, and an InvariantFacilitator. Instantiations of the InvariantVisitor and InvariantFacilitator classes encapsulate the invariants in C++ statements and facilitate the validation of the invariants. We describe both our approach and our results of validating invariants in keystone, a well tested parser front-end for C++.
منابع مشابه
Weaving Aspects into C++ Applications for Validation of Temporal Invariants
In this paper, we describe temporal invariants, which are class invariants that are qualified by the operators eventually, always, never, or already. Temporal invariants can capture assertions that may not be valid initially but, as the program continues, must eventually become valid. Moreover, temporal invariants can indicate references to memory that should eventually be deallocated. To facil...
متن کاملApplications of some Graph Operations in Computing some Invariants of Chemical Graphs
In this paper, we first collect the earlier results about some graph operations and then we present applications of these results in working with chemical graphs.
متن کاملExploiting design patterns to automate validation of class invariants
In this paper, techniques are presented that exploit two design patterns, the Visitor pattern and the Decorator pattern, to automatically validate invariants about the data attributes in a C++ class. To investigate the pragmatics involved in using the two patterns, a study of an existing, well-tested application, keystone, a parser and frontend for the C++ language, is presented. Results from t...
متن کاملThe Daikon system for dynamic detection of likely invariants
Daikon is an implementation of dynamic detection of likely invariants; that is, the Daikon invariant detector reports likely program invariants. An invariant is a property that holds at a certain point or points in a program; these are often used in assert statements, documentation, and formal specifications. Examples include being constant (x = a), non-zero (x 6= 0), being in a range (a ≤ x ≤ ...
متن کاملParameterized Veri cation with AutomaticallyComputed Inductive Assertions ?
The paper presents a method, called the method of verii-cation by invisible invariants, for the automatic veriication of a large class of parameterized systems. The method is based on the automatic calculation of candidate inductive assertions and checking for their induc-tiveness, using symbolic model-checking techniques for both tasks. First, we show how to use model-checking techniques over ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2002